package com.neutech.view;

import com.neutech.dao.impl.businessAchieve;

import java.util.Scanner;

public class businessLogon {
    static Scanner input = new Scanner(System.in);
    static businessAchieve ba = new businessAchieve();
    public static int businessOn(){
        System.out.print("请输入账号：");
        int businessId = input.nextInt();
        System.out.print("\n请输入密码：");
        String password = input.next();
        int x = ba.getBusinessByIdByPass(businessId,password);
        return x;
    }

    public static int register(){
        System.out.print("请输入账号：");
        int businessId = input.nextInt();
        System.out.print("\n请输入密码：");
        String password = input.next();
        int X = ba.registerBusiness(businessId,password);
        return X;
    }

    public static int updatePassword(){
        System.out.print("请输入账号：");
        int businessId = input.nextInt();
        System.out.print("\n请输入新密码：");
        String password = input.next();
        int X = ba.registerBusiness(businessId,password);
        return X;
    }

}
